home *** CD-ROM | disk | FTP | other *** search
/ The Disc - MacWorld 1995 / PowerComputing (The Disc)(MacWorld 1995).ISO / mac / CDFACTOR / HCfactor / HumanCode / HumanCode.DXR / 00081.ls < prev    next >
Encoding:
Text File  |  1995-07-14  |  814 b   |  22 lines

  1. global ggridlist, glessonnumber, galllessonlist, theSparkle, gSpliteSetList, gNextPlay
  2.  
  3. on mouseDown
  4.   set chapternum to integer((getAt(clickLoc(), 1) - getAt(ggridlist, 7)) / getAt(ggridlist, 5))
  5.   set lessonnum to integer((getAt(clickLoc(), 2) - getAt(ggridlist, 8)) / getAt(ggridlist, 5))
  6.   if (lessonnum > 0) and (chapternum > 0) and (lessonnum <= glessonnumber) then
  7.     if chapternum <= getAt(getAt(galllessonlist, lessonnum), 2) then
  8.       sparkle(theSparkle, getAt(clickLoc(), 1), getAt(clickLoc(), 2))
  9.       repeat with n in getAt(gSpliteSetList, 3)
  10.         set the visible of sprite n to 0
  11.       end repeat
  12.       set gNextPlay to [lessonnum, chapternum, #pause]
  13.       set the mouseDownScript to "playerMouseDownScript"
  14.       go("PlayMode")
  15.     else
  16.       beep()
  17.     end if
  18.   else
  19.     beep()
  20.   end if
  21. end
  22.